TARGET := test

OBJECT := main.o

IFLAGS := -I/usr/local/include/ddscxx \
          -I/usr/local/include/iceoryx/v2.0.2 \
          -I/usr/local/include/unitree \
          -I/usr/include/glib-2.0 \
          -I/usr/lib/aarch64-linux-gnu/glib-2.0/include

LFLAGS := -lunitree_sdk2 \
          -lunitree_ros2_idl_cpp \
          -lddsc \
          -lddscxx \
          -lrt \
          -lpthread

CFLAGS := -std=c++17

%.o: %.cpp
	g++ -c -o $@ $^ $(IFLAGS) $(CFLAGS)

$(TARGET): $(OBJECT)
	g++ -o $@ $^ $(IFLAGS) $(LFLAGS) $(CFLAGS)

clean:
	rm -rf $(TARGET)
	rm -rf $(OBJECT)